package com.yang.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.stereotype.Component;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author 杨天可
 * @Date 2021/6/10 18:02
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@Table(name = "sys_permission")
public class SysPermission implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    @Column(name = "name")
    private String name;

    @Column(name = "number_sort")
    private Date numberSort;

    @Column(name = "parent_id")
    private Integer parentId;

    @Column(name = "parent_ids")
    private String parentIds;

    @Column(name = "permission")
    private String permission;

    /*数据库对应的是枚举类型，需要写工具类做处理*/
    @Column(name = "resource_type")
    private String resourceType;

    @Column(name = "url")
    private String url;
}
